07. Solutions: POSITION, STRPOS, & SUBSTR

POSITION, STRPOS, & SUBSTR Solutions

  1. SELECT LEFT(primary_poc, STRPOS(primary_poc, ' ') -1 ) first_name, 
       RIGHT(primary_poc, LENGTH(primary_poc) - STRPOS(primary_poc, ' ')) last_name
    FROM accounts;
  2. 2.
SELECT LEFT(name, STRPOS(name, ' ') -1 ) first_name, 
          RIGHT(name, LENGTH(name) - STRPOS(name, ' ')) last_name
FROM sales_reps;

Code

If you need a code on the https://github.com/udacity.